<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php require 'dbConnect.php';
include("header.php"); ?>
<body>
<h1>SQL INSERT INTO Student table</h1>
Student Name: <?php echo $_REQUEST['StudentName']; ?><br />
Student SSN: <?php echo $_REQUEST['StudentSSN']; ?><br />
Student Email: <?php echo $_REQUEST['StudentEmail']; ?><br />
Student Phone: <?php echo $_REQUEST['StudentPhone']; ?><br />
<?php
$StudentName = trim($_REQUEST['StudentName']);
$StudentSSN = trim($_REQUEST['StudentSSN']);
$StudentAddress = trim($_REQUEST['StudentAddress']);
$StudentCity = trim($_REQUEST['StudentCity']);
$StudentZipcode = trim($_REQUEST['StudentZipcode']);
$StudentEmail = trim($_REQUEST['StudentEmail']);
$StudentPhone = trim($_REQUEST['StudentPhone']);
    $insert_sql = "INSERT INTO Student (StudentName, StudentSSN, StudentAddress, StudentCity, StudentZipcode, StudentEmail, StudentPhone)" .
    "VALUES ('{$StudentName}', '{$StudentSSN}', '{$StudentAddress}', '{$StudentCity}', '{$StudentZipcode}', '{$StudentEmail}', '{$StudentPhone}');";
    mysql_query($insert_sql)
      or die(mysql_error());
include("footer.php"); ?>
